package myJs.explore

import myJs.api.Api
import myJs.cps._
import myJs.cps.project._
import myJs.myPkg.ReactRouterDOM
import myJs.myPkg.bootstrap.jquery.ScrollspyOptions
import myJs.myPkg.jquery.$
import org.scalajs.dom.{document, window}
import slinky.core.annotations.react
import slinky.core.facade.Hooks._
import slinky.core.{FunctionalComponent, TagElement}
import slinky.web.SyntheticMouseEvent
import slinky.web.html._
//import myJs.myPkg.i18n.ReactI18next
import myJs.Implicits._
import typings.csstype.csstypeStrings
import shared.VarTool

/** Created by yz on 21/1/2022
  */
@react object SingleCellCp {

  case class Props(geneName: String, showLoading: Boolean = true, defaultAnchor: String = "sUMap")

  val component = FunctionalComponent[Props] { props =>
    val (geneName, setGeneName) = useState(props.geneName)

    object FTool {
      def geneNameChange = (v: String) => {
        setGeneName(v)
      }
    }

    div(
      style := Style(display = csstypeStrings.flex, maxWidth = 1108),
      CommonSingleCellCp(
        geneName = geneName,
        geneNameChange = FTool.geneNameChange,
        showLoading = props.showLoading,
        defaultAnchor = props.defaultAnchor
      )
    )

  }

}
